package cs340.stormtroopers.junitTests;

import cs340.stormtroopers.hypeerweb.BroadcastVisitor;
import cs340.stormtroopers.hypeerweb.Contents;
import cs340.stormtroopers.hypeerweb.Node;
import cs340.stormtroopers.hypeerweb.Parameters;

public class ConcreteBroadcastVisitor extends BroadcastVisitor
{

	protected void operation(Node node, Parameters parameters)
	{
		Contents contents = node.getContents();
		if (contents.containsValue(parameters.get("message")))
		{
			System.err.println("Node " + node.getWebIdValue()
					+ " has already received " + parameters.get("message"));
		}
		contents.put("message", parameters.get("message"));
	}


}
